package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntity
import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import lombok.Data
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "se_security_advisor")
@TableName("se_security_advisor")
@ApiModel(value = "安全顾问")
data class SecurityAdvisor(

        @ApiModelProperty("绑定的用户id")
        var userId: String? = null,

        @ApiModelProperty("区域id")
        var areaId: String? = null,

        @ApiModelProperty("自拍照")
        var selfPic: String? = null,

        @ApiModelProperty("安全顾问专业信息 逗号隔开")
        var businessIds: String? = null,

        @ApiModelProperty("所属机构名称")
        var organizationName: String? = null,

        @ApiModelProperty("微信号")
        var weChatNum: String? = null,

        @ApiModelProperty("培训记录")
        @Column(length = 1000)
        var trainingRecord: String? = null,

        @ApiModelProperty("身份证号")
        var idCardNum: String? = null,

        @ApiModelProperty("简介")
        var introduction: String? = null

) : XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()

    companion object {
        private const val serialVersionUID = 1L
    }
}